package mr

//
// RPC definitions.
//
// remember to capitalize all names.
//

import (
	"os"
	"time"
)
import "strconv"

// Add your RPC definitions here.

type AskingArgs struct {
	//work ask finish
	AskingType string
	//unique id
	WorkId int
	//map reduce
	TaskType  string
	TaskIndex int
}

type Reply struct {
	TaskType  string
	TaskIndex int
	StartTime time.Time
	//map task
	Filename string

	NReduce int
}

// Cook up a unique-ish UNIX-domain socket name
// in /var/tmp, for the coordinator.
// Can't use the current directory since
// Athena AFS doesn't support UNIX-domain sockets.
func coordinatorSock() string {
	s := "/var/tmp/824-mr-"
	s += strconv.Itoa(os.Getuid())
	return s
}
